package cn.iocoder.yudao.module.infra.controller.admin.ocr.vo.record;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Schema(description = "Admin - OCR Record Response VO")
@Data
public class OcrRecordRespVO {

    @Schema(description = "Record ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long id;

    @Schema(description = "Configuration ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long configId;

    @Schema(description = "Configuration name", example = "百度OCR配置")
    private String configName;

    @Schema(description = "File ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long fileId;

    @Schema(description = "OCR type: 1-General OCR, 2-ID Card OCR, 3-Business License OCR, 4-Bank Card OCR, 5-Driving License OCR, 6-Vehicle License OCR", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Integer type;

    @Schema(description = "Original file name", requiredMode = Schema.RequiredMode.REQUIRED, example = "test.jpg")
    private String fileName;

    @Schema(description = "File URL", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://example.com/test.jpg")
    private String fileUrl;

    @Schema(description = "Image URL for display", example = "https://example.com/image.jpg")
    private String imageUrl;

    @Schema(description = "Recognition text content", example = "识别的文本内容")
    private String recognitionText;

    @Schema(description = "OCR recognition result (JSON format)", requiredMode = Schema.RequiredMode.REQUIRED)
    private String result;

    @Schema(description = "Recognition status: 0-Failed, 1-Success", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Integer status;

    @Schema(description = "Error message (when recognition fails)", example = "API key invalid")
    private String errorMsg;

    @Schema(description = "Processing time (milliseconds)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1500")
    private Long processTime;

    @Schema(description = "Confidence score", example = "0.95")
    private BigDecimal confidence;

    @Schema(description = "Create time", requiredMode = Schema.RequiredMode.REQUIRED)
    private LocalDateTime createTime;

}